# redshiftgui
# Builds from https://github.com/puppylinux-woof-CE/petbuilds
# File auto generated by ./mk_petbuild.sh. Edit as necessary.

. ../func
. ../build.conf

URL=https://github.com/maoserr/redshiftgui/archive
PKG=redshiftgui
VER=0.2.4
SVER=Arch64
COMP=tar.gz
DESC="RedshiftGUI - Monitor color temperature adjustment GUI"
DEPS=+iup,+pangox,+redshift
CAT=Desktop
DESKTOP=redshiftgui.desktop
BUILD=
CWD=$(pwd)
[ -z "$MWD" ] && MWD=$(dirname $CWD)
[ -z "$BUILD" ] && BUILD=$DEF_BUILD
# comment these 2 below if you use a custom package() function
[ -f "$DESKTOP" ] || DESKTOP=not
[ -z "$DEPS" ] && DEPS=not

ARCH=$(uname -m)
case $ARCH in # set in build.conf
 *64) 	LIBDIR=$LIBCONF64 
		FLAGS=$CF64;;
 arm*)	LIBDIR=$LIBCONFarm
		FLAGS="-O2" ;;
 i686) 	LIBDIR=$LIBCONF32 
		FLAGS=$CF32;;
	*) 	LIBDIR=$LIBCONF32 
		FLAGS="-O2 -march=$ARCH -mtune=$ARCH";;
esac

build_() {
	mv ${PKG}-${VER}-${SVER} ${PKG}-${VER}
	(
	cd ${PKG}-${VER}
	./configure -DENABLE_RANDR=yes \
				-DENABLE_VIDMODE=yes \
				-DENABLE_IUP=yes \
				-DIUP_INCLUDE_DIR=/usr/include/iup \
				-DCMAKE_INSTALL_PREFIX=/usr
	make
	)
	mkdir -p ${PKG}-install/usr/{bin,share/pixmaps}
	install -m 0755 ${PKG}-${VER}/build*/redshiftgui ${PKG}-install/usr/bin/
	install -m 0644 ${PKG}.svg ${PKG}-install/usr/share/pixmaps
}

# main
retrieve ${VER}-${SVER}.${COMP}
extract ${VER}-${SVER}.${COMP}
build_
package_std $PKG $VER $ARCH $DESKTOP "$DESC" $DEPS $CAT
